package com.gxnu.edu.cn.ttxxt.service;

import com.gxnu.edu.cn.ttxxt.entity.FileTransfers;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

@Service
public interface FileService {

    FileTransfers uploadFile(Long senderId, Long receiverId, MultipartFile file, boolean isGroup) throws IOException;

    FileTransfers getFileById(Long fileId);

    List<FileTransfers> getUserFiles(Long userId);

    void startFileTransfer(Long fileId);

    void completeFileTransfer(Long fileId);

    void cancelFileTransfer(Long fileId);

    void failFileTransfer(Long fileId, String reason);

    byte[] downloadFile(Long fileId) throws IOException;
}
    